listr = []
signs = ['+','-','*']
nums = ['1','2','3','4']

def getResult(i,j):
    if j == 0:
        listr.append(nums[i-1])
    if signs[j] == '*' or signs[j] == '/':
        s1=listr.pop()+signs[j]+nums[i]
        m = str(eval(s1))
        listr.append(m)
        s1=''
    else:
        listr.append(signs[j])
        listr.append(nums[i])
    if i==3:
        return
    else:
        getResult(i + 1, j + 1)

getResult(1,0)
str2 = ''
str2 = ''.join(listr)
r=eval(str2)
print(r)